flowbox: Remove can-focus handling
authorMatthias Clasen <mclasen@redhat.com>
Tue, 14 Apr 2020 17:29:49 +0000 (13:29 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 14 Apr 2020 19:07:10 +0000 (15:07 -0400)
With the new meaning of can-focus, this doesn't make
sense anymore.

gtk/gtkflowbox.c

index 81c142318bd23d25a2499e942811e27efca9d7b4..da379f3a8a5de713328cb1864859411aea6bfb55 100644 (file)
@@ -426,7 +426,6 @@ gtk_flow_box_child_class_init (GtkFlowBoxChildClass *class)
 static void
 gtk_flow_box_child_init (GtkFlowBoxChild *child)
 {
-  gtk_widget_set_can_focus (GTK_WIDGET (child), TRUE);
 }
 
 /* Public API {{{2 */
@@ -2903,12 +2902,6 @@ gtk_flow_box_focus (GtkWidget        *widget,
   GSequenceIter *iter;
   GtkFlowBoxChild *next_focus_child;
 
-  /* Without "can-focus" flag fall back to the default behavior immediately */
-  if (!gtk_widget_get_can_focus (widget))
-    {
-      return GTK_WIDGET_CLASS (gtk_flow_box_parent_class)->focus (widget, direction);
-    }
-
   focus_child = gtk_widget_get_focus_child (widget);
   next_focus_child = NULL;
 
@@ -3030,10 +3023,6 @@ gtk_flow_box_move_cursor (GtkFlowBox      *box,
   GtkAdjustment *adjustment;
   gboolean vertical;
 
-  /* Without "can-focus" flag fall back to the default behavior immediately */
-  if (!gtk_widget_get_can_focus (GTK_WIDGET (box)))
-    return FALSE;
-
   vertical = priv->orientation == GTK_ORIENTATION_VERTICAL;
 
   if (vertical)